//
//  SuXiDatePicker.swift
//  SXPhotoMember
//
//  Created by 李东 on 2024/3/14.
//

import UIKit

class SuXiDatePicker: UIViewController {
    
    
    @IBOutlet weak var whiteView: UIView!
    @IBOutlet weak var datePicker: UIDatePicker!
    
    var finish:((Date) -> Void)?
    
    
    
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        view.backgroundColor = .black.withAlphaComponent(0.5)
//        datePicker.setValue(UIColor.white, forKey: "textColor")
    }
    
//    lazy var dateformatter: DateFormatter = {
//        let tf = DateFormatter()
//        tf.dateFormat = "yyyy年MM月dd"
//        return tf
//    }()
//
//    override func viewDidLayoutSubviews() {
//        super.viewDidLayoutSubviews()
//        whiteView.jw_corner(byRoundingCorners: [.topLeft, .topRight], radii: 15)
//    }

    
    @IBAction func okHandle(_ sender: Any) {
        dismiss(animated: true)
        finish?(datePicker.date)
        
    }
    
    @IBAction func cancelHandle(_ sender: Any) {
        dismiss(animated: true)
    }
    
}
